import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '阶段标题',
    align: "center",
    dataIndex: 'userId'
  },
  {
    title: '阶段ID',
    align: "center",
    dataIndex: 'phaseId'
  },
  {
    title: '得到积分',
    align: "center",
    dataIndex: 'integral'
  },
  {
    title: '总积分',
    align: "center",
    dataIndex: 'totalIntegral'
  },
  {
    title: '题目数量',
    align: "center",
    dataIndex: 'number'
  },
  {
    title: '答对数量',
    align: "center",
    dataIndex: 'rightNumber'
  },
  {
    title: '答题用时',
    align: "center",
    dataIndex: 'consumeTime'
  },
  {
    title: '准确率',
    align: "center",
    dataIndex: 'accuracyRate'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '阶段标题',
    field: 'userId',
    component: 'Input',
  },
  {
    label: '阶段ID',
    field: 'phaseId',
    component: 'Input',
  },
  {
    label: '得到积分',
    field: 'integral',
    component: 'InputNumber',
  },
  {
    label: '总积分',
    field: 'totalIntegral',
    component: 'InputNumber',
  },
  {
    label: '题目数量',
    field: 'number',
    component: 'InputNumber',
  },
  {
    label: '答对数量',
    field: 'rightNumber',
    component: 'InputNumber',
  },
  {
    label: '答题用时',
    field: 'consumeTime',
    component: 'Input',
  },
  {
    label: '准确率',
    field: 'accuracyRate',
    component: 'InputNumber',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
